import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'//1
Vue.use(VueRouter)//2注册
import Dingdan from "./views/dingdan"
import Fenlei from "./views/fenlei"
import Shouye from "./views/shouye"
import Wode from "./views/wode"//3引入组件
//二级路由引入
import Shouye2 from "./views/Child/shouye2"
import Xinwen2 from "./views/Child/xinwen2"
//三极路由引入
import Shouye3 from "./views/Child/Child2/shouye3"



const routes = [  //4路由规则
{path:"/",redirect:"/dingdan" },
{path:"/dingdan",component:Dingdan},
{path:"/fenlei",component:Fenlei},



{path:"/shouye",component:Shouye,
children:[{
  path:"shouye2",component:Shouye2,
  children:[{
    path:"shouye3",component:Shouye3,
  }]
},
{   
    path:"xinwen2",component:Xinwen2
}



]

},
{path:"/wode",component:Wode},

]
const router = new VueRouter({routes}) //5实例化vue router

Vue.config.productionTip = false

//6注入
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
